import 'package:flutter_nb_net/flutter_net.dart';

class DeviceDetailsResp extends BaseNetModel {
  int? code;
  String? msg;
  DeviceDetails? data;

  DeviceDetailsResp({this.code, this.msg, this.data});

  @override
  fromJson(Map<String, dynamic> json) {
    return DeviceDetailsResp(
      code: json['code'],
      msg: json['msg'],
      data: json['data'] != null ? DeviceDetails().fromJson(json['data']) : null,
    );
  }
}

class DeviceDetails extends BaseNetModel {
  String? createBy;
  String? createTime;
  String? updateBy;
  String? updateTime;
  String? remark;
  Map<String, dynamic>? params;
  String? imei;
  String? deviceAgent;
  int? deviceAgentId;
  String? deviceAgentAncestors;
  String? deviceModel;
  String? devicePhone;
  String? deviceName;
  String? deviceContactPerson;
  String? deviceContactPhone;
  int? deviceBinding;
  int? deviceActivation;
  int? deviceStatus;
  int? recordGears;
  int? securityVip;
  int? securityStatus;
  int? securityNum;
  int? securityDay;
  String? securityExpTime;
  int? highVip;
  int? highStatus;
  int? playbackVip;

  DeviceDetails({
    this.createBy,
    this.createTime,
    this.updateBy,
    this.updateTime,
    this.remark,
    this.params,
    this.imei,
    this.deviceAgent,
    this.deviceAgentId,
    this.deviceAgentAncestors,
    this.deviceModel,
    this.devicePhone,
    this.deviceName,
    this.deviceContactPerson,
    this.deviceContactPhone,
    this.deviceBinding,
    this.deviceActivation,
    this.deviceStatus,
    this.recordGears,
    this.securityVip,
    this.securityStatus,
    this.securityNum,
    this.securityDay,
    this.securityExpTime,
    this.highVip,
    this.highStatus,
    this.playbackVip,
  });

  @override
  fromJson(Map<String, dynamic> json) {
    return DeviceDetails(
      createBy: json['createBy'] ?? '',
      createTime: json['createTime'] ?? '',
      updateBy: json['updateBy'] ?? '',
      updateTime: json['updateTime'] ?? '',
      remark: json['remark'] ?? '',
      params: json['params'] ?? {},
      imei: json['imei'] ?? '',
      deviceAgent: json['deviceAgent'] ?? '',
      deviceAgentId: json['deviceAgentId'] ?? 0,
      deviceAgentAncestors: json['deviceAgentAncestors'] ?? '',
      deviceModel: json['deviceModel'] ?? '',
      devicePhone: json['devicePhone'] ?? '',
      deviceName: json['deviceName'] ?? '',
      deviceContactPerson: json['deviceContactPerson'] ?? '',
      deviceContactPhone: json['deviceContactPhone'] ?? '',
      deviceBinding: json['deviceBinding'] ?? 0,
      deviceActivation: json['deviceActivation'] ?? 0,
      deviceStatus: json['deviceStatus'] ?? 0,
      recordGears: json['recordGears'] ?? 0,
      securityVip: json['securityVip'] ?? 0,
      securityStatus: json['securityStatus'] ?? 0,
      securityNum: json['securityNum'] ?? 0,
      securityDay: json['securityDay'] ?? 0,
      securityExpTime: json['securityExpTime'] ?? '',
      highVip: json['highVip'] ?? 0,
      highStatus: json['highStatus'] ?? 0,
      playbackVip: json['playbackVip'] ?? 0,
    );
  }
}

class DateDataResp extends BaseNetModel {
  int? code;
  String? msg;
  List<DateMonthResp>? data;

  DateDataResp({this.code, this.msg, this.data});

  @override
  fromJson(Map<String, dynamic> json) {
    return DateDataResp(
      code: json['code'],
      msg: json['msg'],
      data: json['data'] != null ? List<DateMonthResp>.from(json['data'].map((x) => DateMonthResp().fromJson(x))) : null,

    );
  }
}

class DateMonthResp extends BaseNetModel {
  int? value;
  String? date;

  DateMonthResp({this.value, this.date});

  @override
  fromJson(Map<String, dynamic> json) {
    return DateMonthResp(
      value: json['value'],
      date: json['date'],
    );
  }
}